.data
string: .asciz "Azeria Labs\n"  @ .asciz adds a null-byte to the end of the string
after_string:

@ 通过从字符串后面的地址减去字符串开头的地址来计算字符串的大小
.set size_of_string, after_string - string

.text
.global _start

@ write 系统调用原型：ssize_t write(int fd, const void *buf, size_t count);

_start:
    mov r0, #1               @ fd 1 = STDOUT
    ldr r1, addr_of_string   @ memory address of string
    mov r2, #size_of_string  @ size of string
    mov r7, #4               @ write syscall
    swi #0                   @ invoke syscall

@ 退出程序，使用系统调用exit()，它的系统调用号是1
_exit:
    mov r7, #1               @ exit syscall
    swi 0                    @ invoke syscall

addr_of_string: .word string
